package cn.showcon.firstapp.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Xue Lanbin
 */
@RestController
@RequestMapping("/springai/test")
public class TestSpringAiController {

    @GetMapping(value = "/chat")
    public String chat(String message) {

//        OllamaApi ollamaApi = new OllamaApi("http://192.168.1.240:11434");
//        OllamaOptions ollamaOptions = OllamaOptions.create().withModel("qwen2:7b");
//        OllamaChatModel ollamaChatModel = new OllamaChatModel(ollamaApi, ollamaOptions);
//
//        String result = ollamaChatModel.call("Java 介绍");
//        System.out.println(result);

        return "ok";
    }
}
